//
//  ProductListTableViewCell.m
//  demo
//
//  Created by maxine on 2016/11/11.
//  Copyright © 2016年 maxine. All rights reserved.
//

#import "ProductListTableViewCell.h"
#import "MyAppointTableViewController.h"

@interface ProductListTableViewCell ()


/**
 产品编号 贷款类型 产品名称
 */
@property (weak, nonatomic) IBOutlet UILabel *proid;
@property (weak, nonatomic) IBOutlet UILabel *lotype;
@property (weak, nonatomic) IBOutlet UILabel *proName;

/**
 还款方式 首次还款
 */
@property (weak, nonatomic) IBOutlet UILabel *repayMode;
@property (weak, nonatomic) IBOutlet UILabel *firstRedateVal;

/**
 综合费率 年利率 月利率
 */
@property (weak, nonatomic) IBOutlet UILabel *zhfl;
@property (weak, nonatomic) IBOutlet UILabel *nll;
@property (weak, nonatomic) IBOutlet UILabel *yll;


@end


@implementation ProductListTableViewCell


/**
 liji预约

 @param sender  ..
 */
- (IBAction)lijiYYClick:(id)sender {
    self.pushBlock();
}

+(instancetype)cellWithTableView:(UITableView *)tableView{
    //1.创建标识符
    static NSString *ID = @"PL";
    //2.去缓存池中找
    ProductListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID ];
    //3.如果找不到就新建
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"ProductListTableViewCell" owner:nil options:nil] lastObject];
    }
    
    return cell;
}
- (void)setPromodel:(ProduModel *)promodel{
    _promodel = promodel;
    
    self.proid.text = promodel.prodId;
    self.lotype.text = promodel.loanTypeVal;
    
    self.proName.text = promodel.prodName;
    self.repayMode.text = promodel.repayModeVal;
    self.firstRedateVal.text = promodel.firstRedateVal;
    
    self.zhfl.text = [NSString stringWithFormat:@"%@%@",promodel.feeRate,@"%"];
    self.nll.text = [NSString stringWithFormat:@"%@%@",promodel.yrate,@"%"];
    self.yll.text = [NSString stringWithFormat:@"%@%@",promodel.mrate,@"%"];
}



@end
